<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>用户管理</title>
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/layui/css/layui.css">
	<style type="text/css">
	.layui-form.layui-border-box.layui-table-view{
	border-color:#ffffff
	}
	
	</style>
</head>
<body style="background-color: #FFFFFF;">
	<div class="layui-container">
		<!--头部导航 -->
		<div class="layui-row">
			<div class="layui-col-md12">
				<ul class="layui-nav layui-bg-green">
					<li class="layui-nav-item"><a id="upload"><i
							class="layui-icon">&#xe67c;</i> 上传Excel</a></li>

					<li class="layui-nav-item"><a
						href="${pageContext.request.contextPath}/sqlrunner" target="_blank"><i
							class="layui-icon">&#xe705;</i> 数据分析<span class="layui-badge-dot"></span></a></li>

					<li class="layui-nav-item"><a
						href="${pageContext.request.contextPath}/user"><i
							class="layui-icon">&#xe613;</i> 用户管理</span></a></li>

					<li class="layui-nav-item"><a
						href="${pageContext.request.contextPath}/log"> <i
							class="layui-icon">&#xe60a;</i> 操作日志
					</a></li>

					<li class="layui-nav-item"><a href=""> <i
							class="layui-icon" style="font-size: 20px;">&#xe612;</i> 管理员
					</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">修改信息</a>
							</dd>

							<dd>
								<a href="javascript:;" id="login_out">退出</a>
							</dd>
						</dl></li>
				</ul>
			</div>
		</div>

		<fieldset class="layui-elem-field layui-field-title"
			style="margin-top: 20px;">
			<legend>用户管理</legend>
		</fieldset>

		<div class="layui-row">
			<div class="layui-col-md12" id="data" lay-filter="data"></div>
		</div>
	</div>
	<script src="/lib/jquery.min.js"></script>
	<script src="${pageContext.request.contextPath}/layui/layui.all.js"></script>
	<script src="${pageContext.request.contextPath}/js/admin/layUpload.js"></script>
	<script src="${pageContext.request.contextPath}/js/tools.js"></script>
	<script src="${pageContext.request.contextPath}/js/isLogin.js"></script>
	<script type="text/html" id="typeTpl">
  		<label >{{d.type == 1 ?'管理员':'用户'}}</label>
	</script>
	<script>
		var table = layui.table;

		//第一个实例
		table.render({
			elem : '#data',
			height : 'full-200',
			limit : 15,
			skin:"nob",
			url : '/user/list' //数据接口
			,
			page : false,
			cols : [ [ //表头
			{
				field : 'id',
				title : '编号',
				width : '30%'
			}, {
				field : 'username',
				title : '用户名',
				width : '40%'
			}, {
				field : 'type',
				title : '用户类型',
				width : '30%',
				templet : '#typeTpl'
			} ] ]
		});
	</script>
</body>
</html>